package com.corx.network.config;

import com.corx.network.core.holder.*;
import com.corx.network.core.manager.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * @author gx
 * @version 1.0.0
 */
@Configuration
public class InjectHolderAutoConfiguration {

    @Autowired(required = false)
    public void setDeviceStateManager(DeviceStateManager manager){
        DeviceStateManagerHolder.register(manager);
    }

    @Autowired(required = false)
    public void setNetworkStateManager(NetworkStateManager manager){
        NetworkStateManagerHolder.register(manager);
    }

    @Autowired(required = false)
    public void setJarManagerHolder(ReceivedMessageListenerJarManager manager){
        JarManagerHolder.register(manager);
    }

    @Autowired(required = false)
    public void setNetworkManager(NetworkManager manager){
        NetworkManagerHolder.register(manager);
    }

    @Autowired(required = false)
    public void setStorageManager(StorageManager manager){
        StorageManagerHolder.register(manager);
    }

}
